package cn.itzzx.lagou.controller;

import cn.itzzx.lagou.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * TODO
 *
 * @author Martin
 * @since 1.0
 */
@RestController
public class EmailController {

    @Autowired
    private MailService mailService;

    @RequestMapping(value = "/send/{email}/{code}")
    public String send(@PathVariable("email") String email,
                       @PathVariable("code") String code) {
        mailService.sendSimpleTextMailActual("第三阶段模块四注册用户验证码", "您的验证码为[" + code + "]", new String[]{email}, null, null, null);
        return "1";
    }
}
